home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 19
/
Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso
/
Aminet
/
game
/
patch
/
Civvie.lha
/
Civvie
/
readme
< prev
Wrap
Text File
|
1997-02-01
|
6KB
|
141 lines
Civvie 1.0
----------
CivManager provides a better savefiles interface to Civilization.
When it works, you get readable names for your saves such as
Emperor Caesar of the Romans/1 AD or Emperor Max of the French/2000 BC.3
As it is a hack, you should be aware of what you are doing, so there
is no install file. You have to understand what is going on to install it.
I got the idea from a small program by xxx named civmanager. My program
mostly is an extension of the base idea to a proper civilization save files
manager.
Installation:
------------
Start with civilization installed on your harddisk. Set your machine up
so that the assign civ: points to civilization directory. If you are not
running at least 2.04, you are out of luck.
Civmanager has been developped with civilization ECS. I don't know whether
it works if you have civilization AGA. As it just depends on the save files
format, and the save files name, there is a good chance this has not changed.
Create a directory named civ:saves to store your save files.
Rename the main civilization program to civilization.exe. Keep whatever
scripts you had around to launch civilization under any name you wish.
Choose civmanager flavor: if you already have ixemul, civmanager.ixemul is
smaller, whereas civmanager.sasc doesn't use any external library.
copy civmanager to civ: Name it civilization if you wish, or leave it as
civmanager.
Checking that it works
----------------------
Start civmanager from a CLI. A file requester should pop up asking you for a
save file in an empty subdirectory. Select CANCEL for the time being.
Civilization should start up normally. Play as usual. When you want to save
a game, save it to RAM:. At that point, you should hear/see your harddrive
at work, which is unusual for civilization.
Quit civilization. You should experience no unusual problems (that is,
civilization already hangs randomly on my machine).
Check the civ:saves directory. Your save files should be there, with readable
names, such as Emperor Caesar of the Romans/3880 BC.
Start civmanager again, this time tell it to restaure one of these savefiles.
Once civilization proper starts up, select load, go to the ram disk: you should
find your save file on the ram disk. Check that it restaures properly.
In case anything does not work as expected, check messages in the CLI window.
You may get a clear indication of what is going wrong.
If civilization doesn't run, check the subtask.c source against the assigns
you usually have to apply for civilization.
If the save files don't convert properly, check that
- the map file is 40000 bytes long
- file names come in pair: civil#.sve and civil#.map
- the sve file starts as expected (see civ.c for the header format)
Converting old save files
-------------------------
Note that you can still load all saves into civilization and save them to
ram: one by one... this can be rather tedious though.
You had better use your amiga multitasking capabilities.
- start civmanager, don't restaure any save, let civilization launch.
- switch back to workbench. Get another cli running.
- copy your old saves to the ram disk. Namely, for a device hd0: that
holds save files, do a copy hd0:civil?.map ram:, then a
copy hd0:civil?.sve ram: VERY IMPORTANT: you have to copy the .sve files
AFTER the .map files, as civmanager savefile watcher is triggered by civil?.sve
modifications. Otherwise, maps and sve can easily get out of sync.
I'd advise to check your new save files before deleting the old.
Useful tips
-----------
- If you are playing several games at the same time, arrange things to get
distinct directories. Either play different nations, or use different leader
names. Save file names are completely automatic. Popping up a requester would
be more difficult, as civilization tends to catch every keyboard and mouse
event in a non system friendly way.
- civmanager bases savefiles names on contents. Moving files around doesn't
help. It would be trivial to add some editing abilities to civmanager, though.
- ModePro is a great program. It can promote civilization screens handsomely.
Civilization is designed for a 400 lines display, such as NTSC or Euro36. It
does look much better than PAL.
Technical details
-----------------
Civmanager is based upon dos.library file notification.
What it does is:
- move `compact' save file to ram:civil0.sve / ram:civil0.map
- launch a subtask that starts civilization
- set up file notification requests for civil0-9.sve
- catch up all save files to ram:, convert the file to its compact format
- cleans up everything when the subtask notifies it and dies.
It is a good example of FileNotification.
Some reverse engineering was done to read civilization file headers.
The file management is trivial: it saves to the first save file that
does not exist, going through Emperor Max of the Romans/3980 BC,
then Emperor Max of the Romans/3980 BC.1, Emperor Max of the Romans/3980 BC.2.
The only tricky part is that civilization uses the same save file name several
times (Deleting the old file, then creating the new). As we are watching
asynchronously, we may get several File notifications requests that concern
the same save, so we check the file' last modification time to ensure we don't
copy the same save twice.
This program also shows how to start a subprocess in a simple reliable way,
and clean up correctly at death: public message port, plus death message
in Forbid()-protected section (so that the other process doesn't quit BEFORE
we actually are dead).
Generally, it shows how reasonable error-handling can be done: never do
anything that may crash the machine, and handle all errors reasonably...
some times reporting the error is enough.
Other things
------------
This hack was written in 2 hours to check for faisability, then I spent another
three hours to get the source to its present state.
Compiling under SAS/C as well as gcc is pretty easy when you start with clear
ideas.
This is freely distributable. You may change and redistribute it. Please do
give me proper credit, state any modifications you make clearly, both in the
source and executable. Don't redistribute as a partial archive, without either
source or documentation.
Marc Espie (Marc.Espie@ens.fr)
january 1997